package cn.com.lookang.robot.entity;

import lombok.*;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import java.util.Objects;

/**
 * @author liulekang
 * @date 2020/7/30
 */
@Data
@Entity
@Builder
@ToString
@AllArgsConstructor
@NoArgsConstructor
@javax.persistence.Table(name = "realm_player_info")
public class RealmPlayerInfoEntity {
    private String id;
    private String playRealmId;
    private String playerName;
    private String playerQq;
    private String playerCareer;

    @javax.persistence.Id
    @javax.persistence.Column(name = "id")
    @GeneratedValue(generator = "system-uuid")
    @GenericGenerator(name = "system-uuid", strategy = "uuid")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @javax.persistence.Basic
    @javax.persistence.Column(name = "play_realm_id")
    public String getPlayRealmId() {
        return playRealmId;
    }

    public void setPlayRealmId(String playRealmId) {
        this.playRealmId = playRealmId;
    }

    @javax.persistence.Basic
    @javax.persistence.Column(name = "player_name")
    public String getPlayerName() {
        return playerName;
    }

    public void setPlayerName(String playerName) {
        this.playerName = playerName;
    }

    @javax.persistence.Basic
    @javax.persistence.Column(name = "player_qq")
    public String getPlayerQq() {
        return playerQq;
    }

    public void setPlayerQq(String playerQq) {
        this.playerQq = playerQq;
    }

    @javax.persistence.Basic
    @javax.persistence.Column(name = "player_career")
    public String getPlayerCareer() {
        return playerCareer;
    }

    public void setPlayerCareer(String playerCareer) {
        this.playerCareer = playerCareer;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        RealmPlayerInfoEntity that = (RealmPlayerInfoEntity) o;
        return Objects.equals(id, that.id) &&
                Objects.equals(playRealmId, that.playRealmId) &&
                Objects.equals(playerName, that.playerName) &&
                Objects.equals(playerQq, that.playerQq) &&
                Objects.equals(playerCareer, that.playerCareer);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, playRealmId, playerName, playerQq, playerCareer);
    }
}
